import request from "@/utils/request.js";

// 1.获取分类页面初始化数据
export const getClassAll = ()=>request({
    url:"/api/catalog/index"
});
// 2.通过id获取展示的数据;
export const getSubCa = (params)=>request({
    url:"/api/catalog/current",
    params
})
// api/goods/category
// 3.获取详情列表;
export const  getCategory = (params)=>request({
    url:"/api/goods/category",
    params
})
// /api/goods/category
// 4.获取商品展示列表;
export const getSmallData = (params)=>request({
    url:"/api/goods/list",
    params
})
// 收藏 取消收藏
// /api/collect/addordelete
export const SC = data=>request({
    url:"/api/collect/addordelete",
    method:"POST",
    data
})
// 购物车总量
export const allData = ()=>request({
    url:"/api/cart/goodscount"
});
//加入购物车/api/cart/add
export const addCart = (data)=>request({
    url:"/api/cart/add",
    method:"POST",
    data
})